package home.pkg

import androidx.databinding.ViewDataBinding
import home.pkg.databinding.RvItemOrderBinding
import home.pkg.BR
import home.pkg.R
import lib.rv.ap.BaseRvAdapter

import lib.rv.ap.IViewTypeModel
import lib.rv.ap.ViewTypeDelegate
import lib.rv.ap.ViewTypeDelegateManager

/**
 * Created on 2020/06/17.
 *
 * @author feling
 * @version 3.0.0
 * @since 3.0.0
 */
class OrderAdapter : BaseRvAdapter<OrderVhModel>() {

    override fun onCreateVHForAll(b: ViewDataBinding) {
        // binding.setVariable(BR.listener, listener)
    }

    override fun onBindVHForAll(b: ViewDataBinding, m: OrderVhModel) {
       //  b.setVariable(BR.item, m)
    }

    override fun addViewTypeDelegate(manager: ViewTypeDelegateManager<OrderVhModel>) {
        manager.add(OrderVTD())
    }
}

class OrderVhModel : IViewTypeModel {
    override fun getViewType(): Int = R.layout.rv_item_order

    // 名称。
    var title: String = ""

}

class OrderVTD : ViewTypeDelegate<RvItemOrderBinding, OrderVhModel> {
    override fun getViewType(): Int = 0

    override fun onCreateVH(binding: RvItemOrderBinding) {

    }

    override fun onBindVH(binding: RvItemOrderBinding, m: OrderVhModel) {

    }
}